<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" href="../../css/aui.css">
    <link rel="stylesheet" href="../../css/normalUser.css">
    <link rel="stylesheet" href="../../css/pulice.css">
    <style>
        .ui-loader-default{ display:none}
        .ui-mobile-viewport{ border:none;}
        .ui-page {padding: 0; margin: 0; outline: 0; min-height: auto !important;}
    </style>
    <script src="../../js/api.js"></script>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/jquery.mobile-1.4.5.min.js"></script>
    <script>
        $(function () {
            $(".center-files").change(function () {
                var $this = $(this).find("input[type=hidden]");
                var obj = $(this).find("input[type=file]").get(0);
                var $show = $(this).children("img");
                var result = new FileReader();
                var buffer = new FileReader();
                result.readAsDataURL(obj.files[0]);
                result.onload = function(){
                    // 用于图片显示的base64数据
                    $show.attr("src",this.result);
                };
                buffer.readAsBinaryString(obj.files[0]);
                buffer.onload = function () {
                    // 用于上传后台处理的二进制流
                    $this.val(this.result);
                }
            });
            $(".rz-agreement").tap(function(){
                var attr = $(this).find("img").attr("src");
                if (attr == "../../img/checkDefault.png") {
                    $(this).find("img").attr("src","../../img/checked.png")
                }else if(attr == "../../img/checked.png") {
                    $(this).find("img").attr("src","../../img/checkDefault.png")
                }
            });
            $('.hm-bar').load('../../data/headerOther.html',function (data) {
                $(this).find('.head-main').text('上传图片');
                $(this).find('.hm-bar-box').css('position','static');
                $(this).find('.head-left').on('tap',function () {
                    window.history.back();
                });
            });
        })
    </script>
    <title>上传图片</title>
</head>
<body id="ksrz">
    <div class="hm-bar"></div>
    <div class="center-order">
        <div class="center-account">
            <div class="center-account-public boxDefault bd0">
                <div class="center-files">
                    <img src="../../img/rz-sfzf.png" alt=""/>
                    <div class="center-files-bg">
                        <img class="center-files-icon" src="../../img/rzImgIcon.png" alt=""/>
                        <span class="font-base-24">身份证正面</span>
                        <input class="center-files-btn" type="file" accept="image/*">
                        <input type="hidden" name="img1" value="">
                    </div>
                </div>
            </div>
            <div class="center-account-public boxDefault bd0">
                <div class="center-files">
                    <img src="../../img/rz-sfzf.png" alt=""/>
                    <div class="center-files-bg">
                        <img class="center-files-icon" src="../../img/rzImgIcon.png" alt=""/>
                        <span class="font-base-24">身份证反面</span>
                        <input class="center-files-btn" type="file" accept="image/*">
                    </div>
                </div>
            </div>
            <div class="center-account-public boxDefault bd0">
                <div class="center-files">
                    <img src="../../img/rz-img2.png" alt=""/>
                    <div class="center-files-bg">
                        <img class="center-files-icon" src="../../img/rzImgIcon.png" alt=""/>
                        <span class="font-base-24">手持身份证</span>
                        <input class="center-files-btn" type="file" accept="image/*">
                    </div>
                </div>
            </div>
            <div class="center-account-public boxDefault bd0">
                <a class="rz-href font-base-28" href="">查看上传标准</a>
            </div>
        </div>
    </div>
    <a class="btn btn-blue btn-mt" href="">提交</a>
</body>
</html>